import smtplib

from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart

def send_mail():
    with open(report_file,'r') as f:
        content = f.read().decode('utf-8')

    msg = MIMEMultipart('mixed')

    # add email content
    msg_html = MIMEText(content,'html','utf-8')
    msg.attach(msg_html)

    # add email file
    msg_attachment = MIMEText(content, 'html', 'utf-8')
    msg_attachment['Content-Disposition'] = 'attachment'
    msg.attach(msg_attachment)

    msg['Subject'] = mail_subject
    msg['Form'] = mail_user
    msg['To'] = ';'.join[mail_to]
    try:
        s = smtplib.SMTP(mail_host, 25)
        s.login(mail_user,mail_pwd)
        s.sendmail(mail_user,mail_to,msg.as_string())
        s.quit()
    except Exception as e:
        print("Exception:", e)
